import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
// import HomeView from '../views/HomeView.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'home',
    redirect: '/tj',
  },
  {
    path: '/morse',
    name: 'morse',
    component: () => import('../views/Morse.vue')
  },
  {
    path: '/tj',
    name: 'taiji',
    component: () => import('../views/TaiJi.vue')
  },
  {
    path: '/wuxinghongqi',
    name: 'wuxinghongqi',
    component: () => import('../views/WuXingHongQi.vue')
  },
  {
    path: '/json',
    name: 'json',
    component: () => import('../views/JSON.vue')
  },
  {
    path: '/html',
    name: 'html',
    component: () => import('../views/HTML.vue')
  },
  {
    path: '/script',
    name: 'script',
    component: () => import('../views/Script.vue')
  },
  {
    path: '/audio',
    name: 'audio',
    component: () => import('../views/Audio.vue')
  },
  {
    path: '/chart',
    name: 'chart',
    component: () => import('../views/Chart.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router;

// ?=   exp1(?=exp2)  exp2前面的exp1
// ?<=  (?<=exp2)exp1 exp2后面的exp1
// ?!   exp1(?!exp2)  查找后面不是exp2的exp1
// ?<!  (?<!exp2)exp1 查找前面不是exp2的exp1

// *  0|N
// ?  0|1
// +  1|N
// {0,1} 0-1
// {1,} 1-N
// {1,5} 1-5
// {5,} 5-N
// {5,10} 5-10

// /[\s]/g


// 获取URL主域名
// /(?<=[http|https]:\/\/)([\w.]+)/g

// 获取url参数
// /(?<=[\\?])([\w=&]+)/g


// 检验邮箱
// /[\w.]+@[\w.]+/g
// /[\w.]+@[\w]+[\w.]+/g

// 匹配负数 必须带有-负数符号
// /([-]{1})([\d]+[.]{1}[\d]+)/g

// 匹配 正小数
// /((?<![-\d]+)([\d]+[.]{1}[\d]+))/g


// 匹配中国公民身份证号码
// /(^11|12|13|14|15|21|22|23|31|32|33|34|35|36|37|41|42|43|44|45|46|50|51|52|53|54|61|62|63|64|65|83|81|82)([\d]{4}[\d]{8}[\d]{3}[X0-9]{1})/g
















